﻿<%@ Page Title="New Anime" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="new_item.aspx.cs" Inherits="AnimeLibrary.new_item" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div id="AddAnimeContent">
        <asp:ValidationSummary ID="vldSummary" runat="server" ForeColor="Maroon" BorderColor="#996600" />
        <br />
        <table>
            <tr><td class="td_label">Title:</td><td><asp:TextBox ID="txtTitle" runat="server" class="entry_fields"></asp:TextBox></td><td>
                <asp:RequiredFieldValidator ID="rfvTitle" runat="server" ErrorMessage="Title cannot be empty" ControlToValidate="txtTitle" ForeColor="Maroon">&nbsp;*</asp:RequiredFieldValidator>
                </td></tr>
            <tr><td class="td_label">Author:</td><td><asp:TextBox ID="txtAuthor" runat="server" class="entry_fields"></asp:TextBox></td><td>
                <asp:RequiredFieldValidator ID="rfvAuthor" runat="server" ErrorMessage="Author cannot be empty" ControlToValidate="txtAuthor" ForeColor="Maroon">&nbsp;*</asp:RequiredFieldValidator>
                </td></tr>
            <tr><td class="td_label">No of episodes:</td><td><asp:TextBox ID="txtNoOfEpisodes" runat="server" class="entry_fields"></asp:TextBox></td><td>
                <asp:RequiredFieldValidator ID="rfvNoOfEpisodes" runat="server" ErrorMessage="No of Episodes cannot be empty" ControlToValidate="txtNoOfEpisodes" ForeColor="Maroon">&nbsp;*</asp:RequiredFieldValidator>
                <asp:RangeValidator ID="rgvNoOfEpisodes" runat="server" ControlToValidate="txtNoOfEpisodes" ErrorMessage="Expecting a number greater than 0" ForeColor="Maroon" MinimumValue="1" MaximumValue="1" Type="Integer">*</asp:RangeValidator>
                </td></tr>
            <tr><td class="td_label" style="vertical-align: top;">Plot Summary:</td><td><asp:TextBox ID="txtPlotSummary" runat="server"  class="entry_fields" TextMode="MultiLine" Height="100px"></asp:TextBox></td><td>
                <asp:RequiredFieldValidator ID="rfvPlotSummary" runat="server" ErrorMessage="Plot Summary cannoy be empty" ControlToValidate="txtPlotSummary" ForeColor="Maroon">&nbsp;*</asp:RequiredFieldValidator>
                </td></tr>
            <tr><td class="td_label">Image:</td><td><asp:FileUpload ID="uplImageLocation" runat="server" class="entry_fields" /></td><td>
                <asp:CustomValidator ID="cvlImageLocation" runat="server" ErrorMessage="Please choose a valid image file" ControlToValidate="uplImageLocation" ForeColor="Maroon">&nbsp;*</asp:CustomValidator>
                </td></tr>
            <tr><td colspan="3">&nbsp;</td></tr>
            <tr><td colspan="3"><asp:Button ID="btnSubmit" runat="server" class="entry_fields" style="text-align: center;" Text="Submit" OnClick="btnSubmit_Click" /></td></tr>
        </table>
    </div>
</asp:Content>
